﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/MedicalDirector/MasterDirect.master" AutoEventWireup="true" CodeFile="Danhsachkhoa.aspx.cs" Inherits="Management_MedicalDirector_Danhsachkhoa" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width:100%;">
            <tr>
                <td clas="tdtalbe" style="text-align:center; color:red;padding-bottom:10px">
                    <asp:Label ID="lbTitle1" runat="server" Text="Danh sách khoa" Font-Size="Large"></asp:Label>
                </td>
                <td style="text-align:center;color:green">
                    <asp:Label ID="lbTitleKH" runat="server" Text="" Font-Size="Large"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 430px">
                    <asp:Panel ID="Panel1" runat="server" Width="423px" Height="300px">
                        <table style="width:100%;">
                            <tr>
                                <td>&nbsp;</td>
                                <td>
                                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="danhsachkhoa" Width="408px" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True">
                                        <AlternatingRowStyle BackColor="White" />
                                        <Columns>
                                            <asp:BoundField DataField="Name" HeaderText="Tên Khoa" SortExpression="Name">
                                                <HeaderStyle Height="20px" VerticalAlign="Middle" />
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Height="15px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="Location" HeaderText="Địa Chỉ" SortExpression="Location">
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="TelExt" HeaderText="Số Điện thoại" SortExpression="TelExt">
                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" CancelText="Hủy" DeleteText="Xóa" EditText="Sửa" UpdateText="Lưu"></asp:CommandField>
                                        </Columns>
                                        <EditRowStyle BackColor="#2461BF" />
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                        <sortedascendingcellstyle backcolor="#F5F7FB" />
                                        <sortedascendingheaderstyle backcolor="#6D95E1" />
                                        <sorteddescendingcellstyle backcolor="#E9EBEF" />
                                        <sorteddescendingheaderstyle backcolor="#4870BE" />
                                    </asp:GridView>
                                    <asp:SqlDataSource ID="danhsachkhoa" runat="server" ConnectionString="<%$ ConnectionStrings:HOSPITALMANAGEMENTConnectionString %>" DeleteCommand="DELETE FROM [tbWard] WHERE [ID] = @ID" InsertCommand="INSERT INTO [tbWard] ([ID], [Name], [Location], [TelExt]) VALUES (@ID, @Name, @Location, @TelExt)" SelectCommand="SELECT [ID], [Name], [Location], [TelExt] FROM [tbWard] ORDER BY [ID]" UpdateCommand="UPDATE [tbWard] SET [Name] = @Name, [Location] = @Location, [TelExt] = @TelExt WHERE [ID] = @ID">
                                        <DeleteParameters>
                                            <asp:Parameter Name="ID" Type="Int32" />
                                        </DeleteParameters>
                                        <InsertParameters>
                                            <asp:Parameter Name="ID" Type="Int32" />
                                            <asp:Parameter Name="Name" Type="String" />
                                            <asp:Parameter Name="Location" Type="String" />
                                            <asp:Parameter Name="TelExt" Type="String" />
                                        </InsertParameters>
                                        <UpdateParameters>
                                            <asp:Parameter Name="Name" Type="String" />
                                            <asp:Parameter Name="Location" Type="String" />
                                            <asp:Parameter Name="TelExt" Type="String" />
                                            <asp:Parameter Name="ID" Type="Int32" />
                                        </UpdateParameters>
                                    </asp:SqlDataSource>
                                    <asp:Button ID="btNew" runat="server" style="margin-left: 165px" Text="New" OnClick="new_click" />
                                </td>
                                <td>&nbsp;</td>
                            </tr>

                        </table>
                        </asp:Panel>
                </td>
                <td style="vertical-align:top">
                    <asp:Panel ID="pnInfo" runat="server" Height="103px" Width="500px" BorderColor="#0099FF" BackColor="#99CCFF" Visible="false">
                        <table style="width: 100%;">
                            <tr>
                                <td style="width: 102px;padding:7px">
                                    <asp:Label ID="lbNameNCC" runat="server" Text="Tên:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtNameKH" runat="server" BackColor="#FFFFFF" BorderStyle="None" Width="370px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 102px;padding:7px; height: 13px;"><asp:Label ID="lbAddressNCC" runat="server" Text="Địa chỉ:"></asp:Label></td>
                                <td style="height: 13px">
                                    <asp:TextBox ID="txtAddressKH" runat="server" BackColor="#FFFFFF" BorderStyle="None" Width="370px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 102px;padding:7px;"><asp:Label ID="lbTelNCC" runat="server" Text="Số điện thoại:"></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="txtTelKH" runat="server" BackColor="#FFFFFF" BorderStyle="None" Width="370px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 102px;padding:7px;"></td>
                                <td>
                                    <table style="width:100%;">
                                        <tr>
                                            <td style="width: 46px">
                                                <asp:Button ID="btOK" runat="server" Text="OK" OnClick="ok_click" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btCancel" runat="server" Text="Hủy" OnClick="cancel_click" />
                                            </td>
                                            
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>

                    </asp:Panel>
                </td>
            </tr>
        </table>
</asp:Content>

